module.exports = {
  pageUrl(url, method = "GET", data = {}) {
    url = `https://api.it120.cc/twy/${url}`
    return new Promise((resolve, reject) => {
      wx.request({
        url,
        data,
        method,
        header: {
          "Content-type": "application/x-www-form-urlencoded"
        },
        success: (res) => {
          resolve(res.data)
        }
      })
    })
  }
}